
_price = {"苹果":3.5,
          "梨":4,
          "香蕉":2.5,
          "西瓜":1.5,
          "柚子":3.5 ,
          "葡萄":4 ,
          "哈密瓜":3}

while True:
    str = input("请输入你要查询的水果价格(输入0以退出):")

    if str == "0":
        break


    flag = False

    for i in _price:
        if str == i:
            flag = True
            print(_price[str])
            break



    if not flag:
        print("抱歉，本店不出售该水果！")









